﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Model;

namespace FubiManger.UI
{
    partial class ReasonForm : Smobiler.Core.Controls.MobileForm
    {
        public ReasonForm() : base()
        {
            //This call is required by the SmobilerForm.
            InitializeComponent();
        }
        /// <summary>
        /// 商户
        /// </summary>
        public string merchantid { get; set; }
        /// <summary>
        /// 活动ID
        /// </summary>
        public string actid { get; set; }
        private ms_merchant_activity activity = new ms_merchant_activity();
        private void panclose_Press(object sender, EventArgs e)
        {
            this.Close();
        }

        private void ReasonForm_Load(object sender, EventArgs e)
        {
            activity = merchant_activityDal.Querybyactid(actid);//查活动详情
            if (activity.audit_status == "1")
            {
                lblcolor.BackColor = System.Drawing.Color.FromArgb(251, 153, 132);
                lblcolor.Text = "审核中";
                lblaudit_status.Text = "审核会在1-2工作日内完成";
                lblreason.Text = "该活动正在审核请耐心等待";
            }
            else if (activity.audit_status == "2")
            {
                lblcolor.BackColor = System.Drawing.Color.FromArgb(76, 151, 230);
                lblcolor.Text = "成功";
                lblaudit_status.Text = "审核完成";
                lblreason.Text = "该活动审核完成";
            }
            else
            {
                lblcolor.BackColor = System.Drawing.Color.FromArgb(254, 177, 101);
                lblcolor.Text = "失败";
                lblaudit_status.Text = "审核完成";
                lblreason.Text = activity.reason;//失败原因
            }
        }
    }
}